package com.xszx.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 维修申请表
 * @TableName t_maintain
 */
@TableName(value ="t_maintain")
@Data
public class TMaintain implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer id;

    /**
     * 维修设备名称
     */
    private String maintainName;

    /**
     * 维修原因
     */
    private String maintainMatter;

    /**
     * 申请人
     */
    private String applyName;

    /**
     * 申请部门id
     */
    private Integer applyDep;

    /**
     * 申请时间
     */
    private Date applyDate;

    /**
     * 预估维修金额
     */
    private Double estAmount;

    /**
     * 维保类型id
     */
    private Integer mainTypeId;

    /**
     * 文件路径
     */
    private String fileName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TMaintain other = (TMaintain) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMaintainName() == null ? other.getMaintainName() == null : this.getMaintainName().equals(other.getMaintainName()))
            && (this.getMaintainMatter() == null ? other.getMaintainMatter() == null : this.getMaintainMatter().equals(other.getMaintainMatter()))
            && (this.getApplyName() == null ? other.getApplyName() == null : this.getApplyName().equals(other.getApplyName()))
            && (this.getApplyDep() == null ? other.getApplyDep() == null : this.getApplyDep().equals(other.getApplyDep()))
            && (this.getApplyDate() == null ? other.getApplyDate() == null : this.getApplyDate().equals(other.getApplyDate()))
            && (this.getEstAmount() == null ? other.getEstAmount() == null : this.getEstAmount().equals(other.getEstAmount()))
            && (this.getMainTypeId() == null ? other.getMainTypeId() == null : this.getMainTypeId().equals(other.getMainTypeId()))
            && (this.getFileName() == null ? other.getFileName() == null : this.getFileName().equals(other.getFileName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMaintainName() == null) ? 0 : getMaintainName().hashCode());
        result = prime * result + ((getMaintainMatter() == null) ? 0 : getMaintainMatter().hashCode());
        result = prime * result + ((getApplyName() == null) ? 0 : getApplyName().hashCode());
        result = prime * result + ((getApplyDep() == null) ? 0 : getApplyDep().hashCode());
        result = prime * result + ((getApplyDate() == null) ? 0 : getApplyDate().hashCode());
        result = prime * result + ((getEstAmount() == null) ? 0 : getEstAmount().hashCode());
        result = prime * result + ((getMainTypeId() == null) ? 0 : getMainTypeId().hashCode());
        result = prime * result + ((getFileName() == null) ? 0 : getFileName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", maintainName=").append(maintainName);
        sb.append(", maintainMatter=").append(maintainMatter);
        sb.append(", applyName=").append(applyName);
        sb.append(", applyDep=").append(applyDep);
        sb.append(", applyDate=").append(applyDate);
        sb.append(", estAmount=").append(estAmount);
        sb.append(", mainTypeId=").append(mainTypeId);
        sb.append(", fileName=").append(fileName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}